<%@page contentType="content-type: application/x-javascript" pageEncoding="UTF-8" %>
<%@taglib prefix="s" uri="/struts-tags" %>

var FORMULARIO_AMPLIAR = {
	
	inicio : function() {
		var fecha = $('#fecha');
		fecha.datepicker({ dateFormat: 'dd/mm/yy', prevText: 'Anterior', nextText: 'Siguiente', constrainInput: true, showButtonPanel: true, closeText: ' ' });
		$('#formulario button.calendario').click(function() {
			fecha.datepicker('show');
		});
	}
	
}




var EDITOR = {
	
	inicio : function() {
		CKEDITOR.replace('cuerpo', {
			toolbar : [
				{ name: 'basicstyles', items : [ 'Bold','Italic','Underline','Strike','Subscript','Superscript','-','NumberedList','BulletedList','-','Link','Unlink','Anchor','-','RemoveFormat' ] },
				{ name: 'clipboard',   items : [ 'PasteText','Undo','Redo' ] },
				{ name: 'editing',     items : [ 'Find','Replace','-','SelectAll' ] },
				{ name: 'document',    items : [ 'Source','-','Maximize' ] }
			],
			uiColor : '#cccccc',
			width: 662,
			Height: 180,
			removePlugins: 'elementspath,resize',
			toolbarCanCollapse: false
		});
	}
	
}






$(document).ready(function() {
	FORMULARIO_AMPLIAR.inicio();
	EDITOR.inicio();
});